updating oE chdir

chdir

include filesys.e 
namespace filesys 
public function chdir(sequence newdir) 

sets a new value for the current directory.

Parameters:

newdir : a sequence, the name for the new working directory.

Returns:

An integer, 0 on failure, 1 on success.

Comments:

By setting the current directory, you can refer to files in that directory using just the file name.

The current_dir function will return the name of the current directory.

On Windows the current directory is a public property shared by all the processes running under one shell. On Unix a subprocess can change the current directory for itself, but this will not affect the current directory of its parent process.

Example 1:
if chdir("c:\\euphoria") then 
    f = open("readme.doc", "r") 
else 
    puts(STDERR, "Error: No euphoria directory?\n") 
end if 
See Also:

current_dir, dir

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu